//
//  NewContacter.m
//  17-HomeWork
//
//  Created by GivenBmli on 16/8/6.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "NewContacter.h"

@implementation NewContacter
- (instancetype)initWithName:(NSString *)name age:(NSNumber *)age gender:(NSString *)gender phoneNumber:(NSString *)phoneNumber {
    if (self = [super init]) {
        _name = name;
        _age = age;
        _gender = gender;
        _phoneNumber = phoneNumber;
    }
    return self;    
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super init]) {
        _name = [aDecoder decodeObjectForKey:@"_name"];
        _age = [aDecoder decodeObjectForKey:@"_age"];
        _gender = [aDecoder decodeObjectForKey:@"_gender"];
        _phoneNumber = [aDecoder decodeObjectForKey:@"_phoneNumber"];
        _picStr = [aDecoder decodeObjectForKey:@"_picStr"];
        _contact = [aDecoder decodeObjectForKey:@"_contact"];
        _addresss = [aDecoder decodeObjectForKey:@"_addresss"];
    }
    return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:_name forKey:@"_name"];
    [aCoder encodeObject:_age forKey:@"_age"];
    [aCoder encodeObject:_gender forKey:@"_gender"];
    [aCoder encodeObject:_phoneNumber forKey:@"_phoneNumber"];
    [aCoder encodeObject:_picStr forKey:@"_picStr"];
    [aCoder encodeObject:_contact forKey:@"_contact"];
    [aCoder encodeObject:_addresss forKey:@"_addresss"];
}
@end
